//
// Created by wxd on 2025/7/14.
//

#pragma once

#include <glad/glad.h>
#include <memory>
#include <vector>

class EBO {
public:
    EBO(const std::vector<unsigned int>& data);
    EBO(const std::vector<unsigned int>& data, GLenum usage);

    EBO(const EBO&) = delete;
    EBO& operator=(const EBO&) = delete;
    ~EBO();

    void bind() const;
    void unbind() const;
    void bindData() const;

    GLuint getEBO() const;

    void destroy();

private:
    GLuint m_EBO;
    GLenum m_Usage;
    std::unique_ptr<std::vector<unsigned int>> m_Indices;
};
